#include "Game.h"

enum GameContext
{
	Preamble = -1,
	EndGame
};

Game::Game(void)
{
	HWND console = GetConsoleWindow();
	RECT rect;
	GetWindowRect(console, &rect);
	MoveWindow(console, rect.left, rect.top, 800, 600, TRUE);
}

Game::~Game(void)
{
}

int Game::Execute()
{
	while(MainMenu() > 0)
	{
		system("CLS");
		if(Initialize() == false)
		{
			return -1;
		}

		context->RoundContext(Preamble);

		while(Running)
		{
			if(Endgame == true)	{	context->EventContext(EndGame);	break; }
			GameLoop();
			DetermineLeader();
			CheckForEndgame();
			system("CLS");
		}

		Deinitialize();
	}

	return 0;
}